1. Field of the Invention
The embodiments described herein relate to image processing techniques. In particular, these embodiments relate to reconstructing a color image from data extracted from an imaging array.
2. Related Art
Because of the tri-stimulus nature of human color perception, to reconstruct a color image of a scene it is typically necessary to recover at least three color components (typically red, green, and blue or cyan, magenta, and yellow) for each picture element (pixel) in the image. Ideally, each photo-detector in the imaging device captures co-aligned red, green, and blue data creating a dense color image. This would eliminate the need for color reconstruction. However, such a system is not feasible due to the required complexity of the photo-detectors and the amount of data that would have to be drawn off of the imaging device. An alternative approach is to have each photo detector gather data for a single color creating a sparse color image. Given a known color filter array (CFA) pattern such as a Bayer pattern as described in U.S. Pat. No. 3,971,065 to Bayer, the remaining two colors for each pixel location can be reconstructed using data from neighboring photo detector sites.
Single-sensor electronic cameras employing color filter arrays are widely used for the creation of color imagery. In a color filter array of photo-detectors such as the aforementioned Bayer pattern array, each photo-detector site (pixel) provides information for a single color. For the color image to be of use it is typically converted to a dense color image having data for all three colors at each pixel location. Since there is incomplete color information at each pixel (photo-detector) location, certain assumptions about the image have to be made in order to xe2x80x9crecoverxe2x80x9d the missing colors. One such assumption is that an object in the physical world usually gives rise to image intensities that vary smoothly over the image of the object. In order to economize processing resources, interpolation is typically based upon color information at photo-detectors in a small neighborhood around each pixel.
U.S. Pat. Nos. 5,373,322 and 5,382,976 illustrate bilinear single and two dimensional interpolation algorithms. These algorithms rely on local gradients to select a direction for interpolation between neighboring pixel values. Unfortunately, these methods may provide distortions at image object boundaries where the smoothness assumption breaks down. Not only do these algorithms provide images which tend to be blurred, these algorithms may introduce false or incorrect colors at regions in the image where the smoothness assumption does not apply. Therefore, there is a need for new techniques for providing more accurate color reconstruction in images with high spatial frequency components.
An object of an embodiment of the present invention is to provide a method and system for color interpolation.
It is another object of an embodiment of the present invention to provide a system and method of accurately reconstructing a color image with high spatial frequency components from data provided by an imaging array.
It is another object of an embodiment of the present invention to provide a system and method of accurately reconstructing a color image at object boundaries in an original scene.
It is yet another object of an embodiment of the present invention to provide system and method of determining an appropriate dimension in which to perform color interpolation at specific pixel locations in image data provided by an imaging array.
Briefly, an embodiment of the present invention is directed to a method and system of processing data associated with an array of pixels arranged in two dimensions. The data includes a value representative of an intensity of photoexposure in one of a plurality of distinct spectral regions for each pixel location in the array. For at least one pixel location being associated with a first one of the plurality of spectral regions, a direction for interpolation is selected based upon 1) an intensity gradient at the pixel location and 2) an intensity continuity bias representative of a trend in changes in intensity in a neighborhood in the array of pixels about the pixel location. The method then involves interpolating values representative of an intensity of photoexposure at two or more neighboring pixel locations in at least one set of neighboring pixels aligned along the selected direction to provide a value associated with the at least one pixel location. This value is representative of an intensity in a second one of the plurality of spectral regions distinct from the first spectral region.
By selecting a direction for interpolation based upon the continuity bias in the neighborhood about the pixel location, in addition to the intensity gradient at the pixel location, the interpolation process may be guided by the direction of image xe2x80x9cflowxe2x80x9d which may vary continuously except at object boundaries. The dimension of interpolation at any particular pixel location may then be selected as suggested by the intensity gradient at the pixel location unless the locally available evidence, such as evidence of an object boundary, indicates to the contrary. Preferably, the stronger local evidence of image flow in a first dimension, the higher a contrasting local gradient in a different second dimension must be to override the evidence of image flow in the first dimension.